/*
 *	MIDAS Context Based Routing
 *	cbr_crt.h
 *	Copyright (c) 2007 Bartlomiej Zolnierkiewicz
 *	MEAG IT PW
 */

#ifndef __CBR_CRT_H
#define __CBR_CRT_H

class CBR;

int cbr_connect_to_crt(unsigned short, std::string &);

int cbr_connect_to_crt2(unsigned short, std::string &);

void cbr_ConceptsSet_dump(cbr_ConceptsSet *);

void cbr_getSuperClasses(const cbr_Concept &, cbr_ConceptsSet &);

void cbr_getSubClasses(const cbr_Concept &, cbr_ConceptsSet &);

void cbr_getCommonSuperClasses(const cbr_Concept &, const cbr_Concept &,
				cbr_ConceptsSet &);

cbr_Concept cbr_getClosestCommonSuperConcept(const cbr_Concept &,
					     const cbr_Concept &);

int cbr_PutMsg(void *, int, int);

int cbr_GetMsg(CBR *);

int cbr_checkCBA(const char *, bool &);

int cbr_getCtxDesc(cbr_ID, std::string &);

int cbr_getNodeIP(cbr_ID, std::string &);

void cbr_getElementaryConcepts(const char *, cbr_ConceptsSet &);

void cbr_getSuperConcepts(const cbr_Concept &, int, cbr_ConceptsSet &);

void cbr_getSubConcepts(const cbr_Concept &, cbr_ConceptsSet &);

#endif
